package java02.bll;

import java02.bll.standard.Shape;

// Shape是父类型(一般类)，Retangle是子类型(特殊类)
public class Retangle extends Shape {

    private double length;
    private double width;

    public Retangle(double length, double width) {
        this.length = length;
        this.width = width;
        super.offset = 0;
    }

    @Override
    public double getArea() {
        return length * width + offset;
    }

    @Override
    public double getPerimeter() {
        return (length + width) * 2 + this.offset;
    }
}
